import React, {createContext} from 'react';
import './index.css';
import UserStore from "./stores/userStore";
import ReactDOM from "react-dom/client";
import App from "./App";
import {I18nextProvider} from "react-i18next";
import i18n from "./utils/i18n";

export const UserContext = createContext(new UserStore());

const root = ReactDOM.createRoot(
    document.getElementById('root') as HTMLElement
);
root.render(
    <UserContext.Provider value={new UserStore()}>
        <I18nextProvider i18n={i18n}>
            <App/>
        </I18nextProvider>
    </UserContext.Provider>
);
